import Logo from '@/assets/logo.png'
import DSLLogo from '@/assets/logo-dsl.png'
import ELMLogo from '@/assets/logo-elm.png'
import GJLogo from '@/assets/logo-gj.png'
import LBXLogo from '@/assets/logo-lbx.png'
import YFLogo from '@/assets/logo-yf.png'

const LOGOMAP = {
  default: Logo,
  lbx: LBXLogo,
  gj: GJLogo,
  yf: YFLogo,
  dsl: DSLLogo,
  elm: ELMLogo,
}

export default function ChannelLogo({
  defaultLogo = false,
}: {
  defaultLogo?: boolean
}) {
  const channel = defaultLogo ? 'default' : (sessionStorage.getItem('channel') || 'default')
  if (channel) {
    return <img src={LOGOMAP[channel as keyof typeof LOGOMAP]} alt="Logo" className="block mb-4 h-6" />
  }
}
